PATH 
Mac OS 8 and 9 Developer Documentation > Text and Other International Services > Apple Type Services for Unicode Imaging (ATSUI) > Apple Type Services for Unicode Imaging Reference

     

ATSUCalculateBaselineDeltas

Calculates the optimal baseline positions in a style object.

OSStatus ATSUCalculateBaselineDeltas (
                     ATSUStyle iStyle,
                     BslnBaselineClass iBaselineClass,
                     BslnBaselineRecord oBaselineDeltas);
iStyle
A reference of type ATSUStyle. Pass a reference to a valid style object whose baseline positions you want to control placement of all the glyphs in a single line or in each line of a text layout object. You cannot pass NULL for this parameter.

iBaselineClass
A value of type BslnBaselineClass. Pass the primary baseline from which to calculate the distance to each of the other baseline types. See Baseline Type Constants for a description of possible values. Pass the constant kBSLNNoBaselineOverride if you want to use the standard baseline value from the current font.

oBaselineDeltas
An array of type BslnBaselineRecord. On return, the array contains the distances from a specified baseline to each of the other baseline types in the style object. You cannot pass NULL for this parameter.

function result
A result code. See Result Codes.
DISCUSSION
You can call the ATSUCalculateBaselineDeltas function to calculate the distances from a specified baseline type to each of other baseline types in a specified style object. ATSUCalculateBaselineDeltas takes into account font and text size when performing these calculations.

ATSUI uses these distances to determine the cross-stream shifting to apply to the glyphs in a style run. You can use the resulting array to set or obtain the optimal baseline positions of lines in a text layout object identified by the text layout attribute tag kATSULineBaselineValuesTag. For a description of this tag constant, see Text Layout Attribute Tag Constants.

VERSION NOTES
Available beginning with ATSUI 1.0.


© 2000 Apple Computer, Inc. – (Last Updated 25 Jan 00)